<template>
  <div style="width: 100%; height: 100%">
    <div v-if="pixpay">
      <!-- 顶头栏 -->
      <div class="upper">
        <div class="img">
          <img src="../../img/new-logo.png" alt="" class="logo" />
          <img src="../../img/makees.png" alt="" class="logo1" />
          <!-- pc语言选择 -->
          <button class="language" @click="language">{{ languages }}</button>
          <div class="select" v-show="selectes">
            <p @click="English">English</p>
            <p @click="Portuguese">Português</p>
          </div>
          <!-- 移动端选择 -->
          <img
            src="../../img/langes.png"
            alt=""
            @click="showPopup"
            class="popupimg"
          />
          <!-- 语言切换 -->
          <van-popup
            v-model="popup"
            v-show="popup"
            position="bottom"
            round
            class="popup"
          >
            <van-picker
              @confirm="onConfirm"
              @cancel="onCancel"
              :confirm-button-text="$t('register.confirm')"
              :cancel-button-text="$t('register.return')"
              :columns="columns"
              :show-toolbar="showtoolbar"
            />
          </van-popup>
        </div>
      </div>
      <!-- 内容区 -->
      <div id="parent_div">
        <div id="child_div">
          <!-- 详细信息栏 -->
          <div
            class="information"
            v-for="data in orderList"
            :key="data.orderId"
          >
            <!-- 倒计时 -->
            <!-- {{ time ? time : "00:00s" }} -->
            <div class="timediv">
              <img src="../../img/time.png" alt="" class="countDown" />
              <span class="times"
                >{{ $t("register.time") }} {{ time ? time : "00:00s" }}</span
              >
            </div>
            <!-- 虚线 -->
            <div class="linediv">
              <img src="../../img/Line.png" alt="" class="line" />
            </div>
            <!-- 对号 -->
            <div class="Orderdiv">
              <span class="Order">{{ $t("register.OrderSummary") }}</span>
            </div>
            <!-- 商品名 -->
            <div class="Productdiv">
              <span class="Product">{{ $t("register.ProductName") }}: </span
              >&nbsp;
              <span class="ProductName" style="color: #000000; font-weight: 700"
                >{{ data.productName }}
              </span>
            </div>
            <!-- 单号 -->
            <div class="NOdiv">
              <span class="NO"
                >{{ $t("register.NO") }}:&nbsp;&nbsp;&nbsp;
                <span style="color: #000000; font-weight: 700">{{
                  data.orderId
                }}</span></span
              >
            </div>
            <!-- 虚线 -->
            <div class="linediv">
              <img src="../../img/Line.png" alt="" class="line" />
            </div>
            <!-- 价钱 -->
            <div class="pricediv">
              <span class="price"
                >{{ $t("register.Price") }} :<span
                  style="color: #215dd4; font-weight: 700"
                  >&nbsp;&nbsp;{{ orderAmount }}&nbsp;&nbsp;
                  {{ data.currency }}</span
                >
              </span>
            </div>
          </div>
        </div>
      </div>
      <div class="Fillinformation" v-if="payment">
        <div class="CreditCard">
          <img src="../../img/pix.png" alt="" class="piximg" />
          <span>{{ $t("register.PagamentoPIX") }}</span>
          <div class="blue">
            <p class="bluep">{{ $t("register.scan") }}</p>
            <img
              :src="icons"
              class="canvas"
              style="height: 10%; width: 10%"
              v-if="qrimg"
            />
            <canvas
              id="qr"
              ref="qrcode"
              class="canvas"
              style="height: 10%; width: 10%"
              v-if="QRCodes"
            ></canvas>
            <span class="pcAddress">{{ Address }}</span>
            <!-- 移动端复制输入框 -->
            <van-cell-group class="vanaddress">
              <van-field
                v-model="Address"
                right-icon="description"
                @click-right-icon="copyToClip"
              />
            </van-cell-group>
            <!-- pc复制输入框 -->
            <input
              type="text"
              name=""
              class="Address1"
              v-model="Address"
              disabled
            />
            <button class="copybtn" @click="copyToClip">
              {{ $t("register.Copy") }}
            </button>
            <span class="tip">{{ $t("register.Tip") }}</span>
          </div>
        </div>
      </div>
      <div>
        <button class="Previous" @click="buttonimg">
          {{ $t("register.Previous") }}
        </button>
        <button class="Now" @click="Finish">{{ $t("register.Finish") }}</button>
      </div>
    </div>
    <!-- 超时 -->
    <my-expired v-if="expired"></my-expired>
  </div>
</template>

<script>
import 'vant/lib/index.css'
import { Toast } from 'vant'
import QRCode from 'qrcode'
import { getOrderEntityAPI, getPingAPI } from '@/api/query'
import { copy, newDate } from '@/utils/means'
export default {
  name: 'linkPay',
  data () {
    return {
      card: '',
      button: true,
      icon: false,
      showCard: false,
      loading: true,
      orderList: [],
      countDown: null,
      orderAmount: '',
      newDate: new Date().getTime(),
      time: null,
      times: null,
      timer: null,
      // 货币支付
      payment: true,
      TaxNumber: '',
      TaxType: '1',
      Mobile: '',
      FullName: '',
      Address: '',
      qrcode: '',
      icons: '',
      selectes: false,
      languages: 'English', // pc语言选择
      popup: false, // 移动端语言选择弹出层显示隐藏
      showtoolbar: true,
      interpretation: 'Português',
      columns: ['English', 'Português'],
      interpretationFlag: '',
      num: '',
      pixpay: true,
      expired: false, // 超时
      qrimg: false,
      QRCodes: false
    }
  },
  created () {
    this.orderList = JSON.parse(localStorage.getItem('orderList')) // 从本地获取最新的orderList
  },
  mounted () {
    this.goback()
    // 加载完成
    this.$nextTick(() => {
      const data = {
        orderId: this.$route.query.orderId,
        pixcompleted: 'pix-Loading-completed = ' + newDate()
      }
      getPingAPI(data)
    })
    // 退出
    window.onbeforeunload = () => {
      const data = {
        orderId: this.$route.query.orderId,
        pixclose: 'pix-close = ' + newDate()
      }
      getPingAPI(data)
    }
  },
  filters: {
    numFilter (value) {
      // 截取当前数据到小数点后六位
      const realVal = parseFloat(value).toFixed(6)
      return realVal
    }
  },
  methods: {
    goback () {
      // 获取后台时间戳
      this.countDown = this.orderList[0].expiresOn
      this.orderAmount = this.orderList[0].orderAmount
      // 定时器方法
      this.countDowns()
      // this.Address = '00020126800014BR.GOV.BCB.PIX0136747b19ad-22dd-4320-897e-a4ffba32f0d40218Payment by QR-Code5204000053039865406109.065802BR5912PAGO EXPRESS6009SAO PAULO62290525PPP68752652808702047700006304D8DE'
      this.Address = this.orderList[0].qr.code
      if (this.qrCode) {
        this.qrCode = this.orderList[0].qr.qrCode
        this.icons = 'data:image/png;base64,' + this.qrCode
        this.qrimg = true
      } else {
        this.QRCodes = true
        this.useqrcode()
      }
      // this.Address = '00020126800014BR.GOV.BCB.PIX0136747b19ad-22dd-4320-897e-a4ffba32f0d40218Payment by QR-Code5204000053039865406109.065802BR5912PAGO EXPRESS6009SAO PAULO62290525PPP68752652808702047700006304D8DE'
      // this.qrCode = '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'
      // this.icons = 'data:image/png;base64,' + this.qrCode
    },
    // 定时器
    countDowns () {
      // 过期字符串减去当前系统字符串/1000转换成总秒数
      this.times = Math.floor((this.countDown - this.newDate) / 1000)
      // 通过定时器实现动态倒计时,每隔1秒更新一次
      this.timer = setInterval(() => {
        this.times -= 1
        this.getTime()
        if (this.times <= 0) clearInterval(this.timer)
      }, 1000)
      if (this.times <= 0) clearInterval(this.timer)
    },
    getTime () {
      let m = parseInt(this.times / 60 % 60)
      m = m < 10 ? '0' + m : m
      let s = parseInt(this.times % 60)
      s = s < 10 ? '0' + s : s
      this.time = m + ':' + s + 's'
    },
    // 复制地址
    copyToClip () {
      copy(this.Address)
      const data = {
        orderId: this.$route.query.orderId,
        pixclickcopy: 'pix-click-copy = ' + newDate()
      }
      getPingAPI(data)
      Toast.success({
        message: 'Copy Succeeded',
        className: Toast
      })
    },
    // 填写信息页返回按钮
    buttonimg () {
      // 返回上一页
      const data = {
        orderId: this.$route.query.orderId,
        pixclickPrevious: 'pix-click-Previous = ' + newDate()
      }
      getPingAPI(data)
      this.$router.go(-1)
    },
    Finish () {
      const datatime = {
        orderId: this.$route.query.orderId,
        pixclickfinish: 'pix-click-finish = ' + newDate()
      }
      getPingAPI(datatime)
      const data = {
        orderId: this.$route.query.orderId,
        sign: this.$route.query.sign
      }
      getOrderEntityAPI(data).then(res => {
        if (res.data.code !== 0) {
          Toast.fail({
            message: res.data.msg,
            forbidClick: true,
            className: Toast
          })
        } else {
          this.orderStatus = res.data.data.orderStatus
          this.merchantSuccessUrl = res.data.data.merchantSuccessUrl
          this.merchantFailUrl = res.data.data.merchantFailUrl
          if (this.orderStatus === 11) {
            Toast.loading({
              message: 'Processing',
              forbidClick: true,
              className: Toast
            })
          }
          if (this.orderStatus === 14) {
            const data = {
              orderId: this.$route.query.orderId,
              pixJumpSuccess: 'pix-Jump-Success = ' + newDate()
            }
            getPingAPI(data)
            location.href = this.merchantSuccessUrl
          }
          if (this.orderStatus === 15) {
            const data = {
              orderId: this.$route.query.orderId,
              pixJumpFail: 'pix-Jump-Fail = ' + newDate()
            }
            getPingAPI(data)
            location.href = this.merchantFailUrl
          }
        }
      })
    },
    language () {
      if (this.selectes === true) {
        this.selectes = false
      } else {
        this.selectes = true
      }
    },
    English () {
      this.languages = 'Português'
      this.$i18n.locale = 'en' // 关键语句
      this.selectes = false
    },
    Portuguese () {
      this.languages = 'English'
      this.$i18n.locale = 'zh' // 关键语句
      this.selectes = false
    },
    showPopup () {
      this.popup = true
    },
    // 确定语言
    onConfirm (value) {
      this.interpretationFlag = value
      if (this.interpretationFlag !== this.interpretation) {
        this.interpretation = this.interpretationFlag
      }
      this.langFlag()
      this.popup = false
    },
    // 取消选择语言
    onCancel () {
      this.popup = false
    },
    langFlag () {
      if (this.interpretation === this.columns[0]) {
        this.$i18n.locale = 'en'
      } else if (this.interpretation === this.columns[1]) {
        this.$i18n.locale = 'zh'
      }
    },
    // 二维码生成器
    useqrcode () {
      // 调用函数去生成二维码，参数依次为：二维码的容器、要生成的内容、回调函数
      this.$nextTick(() => {
        QRCode.toCanvas(document.getElementById('qr'), this.Address, function (error) {
          if (error) {
            console.error(error)
          }
        })
      })
    }
  },
  // 监听
  watch: {
    times: {
      handler () {
        if (this.times <= 0) {
          // const data = {
          //   orderId: this.$route.query.orderId,
          //   pixJumpexpired: 'pix-Jump-expired = ' + newDate()
          // }
          // getPingAPI(data)
          // this.pixpay = false
          // this.expired = true
        }
      }
    }
  }
}

</script>

<style scoped lang="scss">
// 移动端
@media screen and (max-width: 700px) {
  /* 信息栏 */
  // 加载遮罩层
  .wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background-color: #ffffff;
    z-index: 100;
  }
  .information {
    width: 95%;
    margin: 10px auto;
    border-radius: 15px;
    box-shadow: 2px 2px 2px #f5f5f5, -2px -2px 2px #f5f5f5;
  }
  .buttonimg {
    position: absolute;
    top: 6px;
    width: 25px;
    height: 25px;
    font-size: 0.7rem;
    background-color: #215dd400;
    border: 0px solid #000;
    color: #fff;
  }
  .timediv {
    position: relative;
    height: 1.02564rem;
    text-align: center;
  }
  .linediv {
    position: relative;
    height: 0.5rem;
  }
  .Orderdiv {
    position: relative;
    height: 1rem;
  }
  .Productdiv {
    line-height: 14px;
    margin-left: 4%;
    margin-bottom: 10px;
  }
  .NOdiv {
    line-height: 14px;
    margin-left: 4%;
    padding-bottom: 25px;
  }
  .pricediv {
    position: relative;
    height: 1rem;
  }
  .price {
    position: absolute;
    left: 4%;
    float: right;
    font-size: 0.38026rem;
    color: #999999;
  }
  .Product {
    // position: absolute;
    display: block;
    font-size: 0.38026rem;
    color: #999999;
    float: left;
  }
  .NO {
    font-size: 0.39026rem;
    color: #999999;
  }
  .Order {
    position: absolute;
    left: 4%;
    font-size: 0.42026rem;
    font-weight: 700;
  }
  .upper {
    width: 100%;
    height: 1.15385rem;
    margin: 0 auto;
    background-color: #215dd4;
  }
  .logo {
    width: 20%;
    height: 0.64103rem;
    margin-top: 0.25641rem;
    margin-left: 38%;
  }
  .logo1 {
    display: none;
  }
  .img {
    padding-top: 1px;
  }
  .succeed {
    background-color: red;
    z-index: 99;
  }
  .ProductName {
    font-size: 0.36026rem;
    display: inline-block;
    word-break: break-all;
    // float: right;
    font-weight: 700;
    width: 50%;
    // margin: 0 auot;
    // word-wrap: break-word;
    // word-break: normal;
    // padding-left: 40%;
    vertical-align: top;
  }
  .orderId {
    font-size: 0.36026rem;
    padding-left: 2%;
    font-weight: 700;
  }
  .orderAmount {
    position: absolute;
    top: 3%;
    left: 13%;
    float: right;
    font-size: 0.36026rem;
    margin-left: 0.38462rem;
    color: #215dd4;
    font-weight: 700;
  }
  .countDown {
    width: 18px;
    height: 18px;
    vertical-align: middle;
    margin-right: 1%;
  }
  .times {
    color: #f2ae2b;
    font-size: 0.27462rem;
    vertical-align: middle;
    font-weight: 700;
  }
  .line {
    width: 95%;
    position: absolute;
    left: 2%;
  }
  // 填写信息
  .Fillinformation {
    width: 95%;
    margin: 10px auto;
    border-radius: 15px;
    box-shadow: 2px 2px 2px #f5f5f5, -2px -2px 2px #f5f5f5;
    padding-bottom: 5%;
    margin-bottom: 60px;
  }
  .CreditCard {
    padding: 0.2rem 0.4rem 0 0.4rem;
    .piximg {
      width: 20px;
      height: 20px;
      vertical-align: middle;
    }
    span {
      margin-left: 0.2rem;
      font-size: 0.37rem;
      font-weight: 700;
    }
  }
  .TaxNumber {
    margin-left: 0.3rem;
    font-size: 0.37rem;
    p {
      font-weight: 700;
      color: #fe6868;
      span {
        color: #333333;
      }
    }
    input {
      width: 92%;
      height: 0.7rem;
      background-color: #f5f6fb;
      border: 0px;
      padding-left: 0.4rem;
      border-radius: 0.2rem;
    }
    input:hover {
      border: 1px solid #215dd4;
    }
  }
  .Mobile {
    margin-left: 0.3rem;
    font-size: 0.37rem;
    p {
      font-weight: 700;
      color: #fe6868;
      span {
        color: #333333;
      }
    }
    input {
      width: 92%;
      height: 0.7rem;
      background-color: #f5f6fb;
      border: 0px;
      padding-left: 0.4rem;
      border-radius: 0.2rem;
    }
    input:hover {
      border: 1px solid #215dd4;
    }
  }
  .FullName {
    margin-left: 0.3rem;
    font-size: 0.37rem;
    p {
      font-weight: 700;
      color: #fe6868;
      span {
        color: #333333;
      }
    }
    input {
      width: 92%;
      height: 0.7rem;
      background-color: #f5f6fb;
      border: 0px;
      padding-left: 0.4rem;
      border-radius: 0.2rem;
    }
    input:hover {
      border: 1px solid #215dd4;
    }
  }
  #selects {
    border: none;
    outline: none;
    font-size: 0.3rem;
    color: #000;
  }
  .TaxType {
    margin-left: 0.3rem;
    font-size: 0.37rem;
    font-weight: 700;
    p {
      color: #fe6868;
      span {
        color: #333333;
      }
    }
    select {
      width: 95%;
      height: 0.7rem;
      background-color: #f5f6fb;
      border: 0px;
      padding-left: 0.4rem;
      border-radius: 0.2rem;
      user-select: none;
    }
    select:hover {
      border: 1px solid #215dd4;
    }
  }
  .Next {
    width: 90%;
    margin: 0 5% 0 5%;
    background-color: #215dd4;
    border: 0px;
    height: 1rem;
    color: #fff;
    font-size: 0.4rem;
    border-radius: 0.3rem;
    img {
      width: 10%;
      vertical-align: middle;
    }
  }
  .All {
    color: #8a8f99;
    font-size: 12px;
    margin-left: 0.4rem;
    margin-top: 00.4rem;
  }
  .blue {
    margin-top: 3%;
    margin-block: 3%;
    width: 100%;
    height: 7.2rem;
    background-color: #32bcad;
    border-radius: 0.2rem;
    padding-top: 2%;
    position: relative;
  }
  .bluep {
    color: #ffffff;
    font-size: 0.3rem;
    font-weight: 700;
    text-align: center;
  }
  // 二维码
  .canvas {
    width: 2.6rem !important;
    height: 2.6rem !important;
    position: absolute;
    top: 23%;
    left: 35%;
  }
  .vanaddress {
    position: absolute;
    top: 62%;
  }
  .Address1 {
    display: none;
  }
  .pcAddress {
    display: none;
  }
  .copy {
    width: 0.4rem;
    height: 0.4rem;
  }
  .copybtn {
    display: none;
  }
  .tip {
    position: absolute;
    top: 82%;
    left: -6%;
    font-size: 12px !important;
    color: #ffffff;
    width: 110%;
    transform: scale(0.8);
    text-align: justify;
  }
  .Previous {
    display: none;
  }
  .Now {
    position: fixed;
    bottom: 2%;
    left: 5%;
    width: 90%;
    height: 0.92564rem;
    background-color: #215dd4;
    color: #ffffff;
    border: 0.02564rem solid #215dd4;
    border-radius: 0.25641rem;
    font-size: 0.30769rem;
  }
  .language {
    display: none;
  }
  .select {
    display: none;
  }
  .popupimg {
    width: 25px;
    height: 25px;
    margin-left: 32%;
  }
}
// PC端
@media screen and (min-width: 700px) {
  input::-webkit-input-placeholder {
    /*WebKit browsers*/
    color: #cccccc;
    font-weight: 400;
  }
  input::-moz-input-placeholder {
    /*Mozilla Firefox*/
    color: #cccccc;
    font-weight: 400;
  }
  input::-ms-input-placeholder {
    /*Internet Explorer*/
    color: #cccccc;
    font-weight: 400;
  }
  #selects {
    border: none;
    outline: none;
    color: #cccccc;
    font-size: 0.1rem;
    option {
      font-size: 0.14rem;
      color: #000;
    }
  }
  // 加载遮罩层
  .wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background-color: #ffffff;
    z-index: 100;
  }
  /* 信息栏 */
  .information {
    width: 80%;
    position: relative;
    box-shadow: 0 0.02856rem 0.08128rem #e9e5e5;
    border-radius: 0.12821rem;
    margin: 0.12821rem auto;
  }
  .buttonimg {
    display: none;
  }
  .timediv {
    position: relative;
    height: 0.33333rem;
    margin-top: 1%;
    float: right;
    width: auto;
  }
  .linediv {
    display: none;
  }
  .Orderdiv {
    position: relative;
    height: 0.25rem;
  }
  .Productdiv {
    margin-left: 2%;
    margin-top: 2%;
    padding-bottom: 0.1rem;
  }
  .NOdiv {
    margin-left: 2%;
    padding-bottom: 2%;
  }
  .pricediv {
    position: relative;
    height: 0.28rem;
    float: right;
    width: 50%;
  }
  .price {
    position: absolute;
    right: 5%;
    top: -100%;
    float: right;
    font-size: 0.11821rem;
    color: #999999;
  }
  .Product {
    position: absolute;
    display: inline-block;
    font-size: 0.11821rem;
    color: #999999;
  }
  .NO {
    font-size: 0.11821rem;
    color: #999999;
  }
  .Order {
    position: absolute;
    left: 2%;
    top: 34%;
    font-size: 0.13rem;
    font-weight: 700;
  }
  .upper {
    width: 100%;
    height: 0.32rem;
    margin: 0 auto;
    background-color: #215dd4;
  }
  .logo {
    height: 0.19rem;
    width: 6.5%;
    margin-left: 10%;
    margin-top: 0.075rem;
  }
  .logo1 {
    height: 0.15rem;
    width: 13%;
    margin-left: 0.5%;
    margin-bottom: 0.025rem;
  }
  .button {
    width: 4%;
    position: absolute;
    top: 5%;
    left: 5%;
  }
  .ProductName {
    font-size: 0.10821rem;
    display: inline-block;
    width: 60%;
    font-weight: 700;
    word-wrap: break-word;
    word-break: normal;
    padding-left: 12%;
    vertical-align: top;
  }
  .orderId {
    font-size: 0.10821rem;
    font-weight: 700;
    padding-left: 2%;
  }
  .orderAmount {
    position: absolute;
    left: 4%;
    top: -97%;
    float: right;
    font-size: 0.10821rem;
    margin-left: 0.38462rem;
    color: #215dd4;
    font-weight: 700;
  }
  .countDown {
    width: 5px;
    height: 5px;
    vertical-align: middle;
    margin-right: 0.08rem;
  }
  .times {
    color: #f2ae2b;
    font-size: 0.09821rem;
    vertical-align: middle;
    margin-right: 0.08rem;
    font-weight: 700;
  }
  // 虚线
  .line {
    width: 95%;
    position: absolute;
    left: 2%;
    display: none;
  }
  .Fillinformation {
    width: 80%;
    position: relative;
    box-shadow: 0 0.02856rem 0.08128rem #e9e5e5;
    border-radius: 0.12821rem;
    margin: 0.12821rem auto;
    padding-bottom: 1%;
  }
  .CreditCard {
    padding: 0.07rem 0.15rem 0 0.15rem;
    span {
      margin-left: 0.1rem;
      font-size: 0.12rem;
      font-weight: 700;
    }
  }
  .piximg {
    width: 10px;
    height: 10px;
    vertical-align: middle;
  }
  .TaxNumber {
    margin-left: 0.15rem;
    font-size: 0.1rem;
    font-weight: 700;
    p {
      color: #fe6868;
      span {
        color: #333333;
      }
    }
    input {
      width: 90%;
      height: 0.3rem;
      background-color: #f5f6fb;
      border: 0px;
      padding-left: 0.15rem;
      border-radius: 0.1rem;
    }
    input:focus {
      border: 0.01rem solid #215dd4 !important;
    }
  }
  .Mobile {
    margin-left: 0.15rem;
    font-size: 0.1rem;
    font-weight: 700;
    p {
      color: #fe6868;
      span {
        color: #333333;
      }
    }
    input {
      width: 90%;
      height: 0.3rem;
      background-color: #f5f6fb;
      border: 0px;
      padding-left: 0.15rem;
      border-radius: 0.1rem;
    }
    input:focus {
      border: 0.01rem solid #215dd4 !important;
    }
  }
  .FullName {
    margin-left: 0.15rem;
    font-size: 0.1rem;
    font-weight: 700;
    p {
      color: #fe6868;
      span {
        color: #333333;
      }
    }
    input {
      width: 90%;
      height: 0.3rem;
      background-color: #f5f6fb;
      border: 0px;
      padding-left: 0.15rem;
      border-radius: 0.1rem;
    }
    input:focus {
      border: 0.01rem solid #215dd4 !important;
    }
  }
  #selects {
    border: none;
    outline: none;
    font-size: 0.1rem;
    color: #000;
  }
  .TaxType {
    margin-left: 0.15rem;
    font-size: 0.1rem;
    font-weight: 700;
    p {
      color: #fe6868;
      span {
        color: #333333;
      }
    }
    select {
      width: 95%;
      height: 0.3rem;
      background-color: #f5f6fb;
      border: 0px;
      padding-left: 0.15rem;
      border-radius: 0.1rem;
    }
    input:focus {
      border: 0.01rem solid #215dd4 !important;
    }
  }
  .Next {
    // position: relative;
    width: 90%;
    margin: 0rem 5% 0 5%;
    background-color: #215dd4;
    border: 0px;
    height: 0.3rem;
    color: #fff;
    font-size: 0.15rem;
    border-radius: 0.1rem;
    img {
      width: 7%;
      vertical-align: middle;
    }
  }
  .All {
    color: #8a8f99;
    font-size: 0.09rem;
    margin-left: 0.15rem;
    margin-top: 0.13rem;
  }
  .blue {
    margin-top: 3%;
    margin-block: 3%;
    width: 100%;
    height: 1.8rem;
    background-color: #32bcad;
    border-radius: 0.08rem;
    padding-top: 3%;
    position: relative;
  }
  .bluep {
    color: #333333;
    color: #333333;
    font-size: 0.1rem;
    font-weight: 700;
    text-align: center;
    display: none;
  }
  // 二维码
  .canvas {
    width: 1.4rem !important;
    height: 1.4rem !important;
    position: absolute;
    top: 14%;
    left: 5%;
  }
  .vanaddress {
    display: none;
  }
  .Address1 {
    position: absolute;
    bottom: 13%;
    left: 5%;
    font-size: 0.08rem;
    width: 77%;
    height: 0.23077rem;
    border-radius: 0.07692rem;
    background-color: #32bcad;
    border: 0;
    padding-left: 2%;
    padding-right: 11%;
    display: none;
  }
  .pcAddress {
    position: absolute;
    top: 20%;
    left: 29%;
    font-size: 0.1rem !important;
    color: #ffffff;
    display: inline-block;
    width: 60%;
    word-break: break-all;
  }
  .copybtn {
    position: absolute;
    top: 45%;
    left: 30%;
    font-size: 0.1rem;
    color: #ffffff;
    width: 10%;
    height: 0.25rem;
    border-radius: 0.06rem;
    border: 0.01rem solid #ffffff;
    background-color: #32bcad;
  }
  .tip {
    position: absolute;
    top: 70%;
    left: 29.5%;
    font-size: 0.09rem !important;
    color: #ffffff;
    width: 60%;
  }
  .copy {
    width: 0.12821rem;
    height: 0.12821rem;
    position: absolute;
    top: 63%;
    right: 20%;
    z-index: 9999;
  }
  .Previous {
    width: 20%;
    margin: 0.13rem 5% 0.1rem 22.5%;
    background-color: #215dd4;
    border: 0px;
    height: 0.3rem;
    color: #fff;
    font-size: 0.12rem;
    border-radius: 0.1rem;
  }
  .Now {
    width: 20%;
    margin: 0.13rem 22.5% 0.1rem 5%;
    height: 0.3rem;
    background-color: #215dd4;
    color: #ffffff;
    border: 0.02564rem solid #215dd4;
    border-radius: 0.10256rem;
    font-size: 0.10256rem;
    font-size: 0.12rem;
  }
  .language {
    font-size: 0.09rem;
    width: 7%;
    height: 0.23rem;
    position: absolute;
    top: 1%;
    right: 10.3%;
    border: 0;
    background-color: #fff;
    border-radius: 0.04rem;
    color: #215dd4;
    font-weight: 700;
    cursor: pointer;
  }
  .select {
    width: 9%;
    height: 0.5rem;
    background-color: #ffffff;
    position: fixed;
    top: 8%;
    right: 9.3%;
    z-index: 30;
    border-radius: 0.04rem;
    box-shadow: 0 0.02856rem 0.08128rem #e9e5e5;
    p {
      margin: 10% auto;
      font-size: 0.09rem;
      cursor: pointer;
      text-align: center;
    }
  }
  .popupimg {
    display: none;
  }
  .popup {
    display: none;
  }
}
</style>
